IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spBoxes_Update')
	BEGIN
		PRINT 'Dropping Procedure spBoxes_Update'
		DROP  Procedure  spBoxes_Update
	END

GO

PRINT 'Creating Procedure spBoxes_Update'
GO
Create Procedure dbo.spBoxes_Update
	( 	  
		@BoxNo varchar(50), 
		@BoxStatus varchar(50) = null, 
		@BoxLocation varchar(50) = null, 
		@BoxWarehouse varchar(50) = null, 
		@LastTransactionUser_ID numeric(9,0) = null, 
		@LastTransactionDate DateTime = null
	)
AS
  /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 2007/11/02    Initial version Updated
    ------------------------------------------------------------------------------
  */

	-- Declare the required variables

	-- Update the required new record
	UPDATE Boxes
	SET
		BoxStatus = @BoxStatus, 
		BoxLocation = @BoxLocation, 
		BoxWarehouse = @BoxWarehouse, 
		LastTransactionUser_ID = @LastTransactionUser_ID, 
		LastTransactionDate = @LastTransactionDate		
	WHERE BoxNo = @BoxNo

	-- Return to calling method
	RETURN
	
GO
